<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GSoC2011SfM: D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/MotionProcessor.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">GSoC2011SfM
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">Google Summer of Code 2011: Structure from motion</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/MotionProcessor.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _GSOC_SFM_MOTION_PROCESSOR_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _GSOC_SFM_MOTION_PROCESSOR_H 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;macro.h&quot;</span> <span class="comment">//SFM_EXPORTS</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;opencv2/highgui/highgui.hpp&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="keyword">namespace </span>OpencvSfM{
<a name="l00012"></a>00012   <span class="keyword">enum</span> TypeOfMotionProcessor
<a name="l00013"></a>00013   {
<a name="l00014"></a>00014     IS_SINGLE_FILE,
<a name="l00015"></a>00015     IS_LIST_FILES,
<a name="l00016"></a>00016     IS_WEBCAM,
<a name="l00017"></a>00017     IS_DIRECTORY,
<a name="l00018"></a>00018     IS_VIDEO
<a name="l00019"></a>00019   };
<a name="l00020"></a>00020 
<a name="l00028"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html">00028</a>   <span class="keyword">class </span>SFM_EXPORTS <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html" title="This class try to create a commun interface for files loading. Indeed, if you want to use webcam...">MotionProcessor</a>
<a name="l00029"></a>00029   {
<a name="l00030"></a>00030   <span class="keyword">protected</span>:
<a name="l00031"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a9bf4bec388b8e54cd70c21ab96d44dd3">00031</a>     TypeOfMotionProcessor <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a9bf4bec388b8e54cd70c21ab96d44dd3" title="This attribut is used to know which type is the input ( webcam, video file, list of file or just one ...">type_of_input_</a>;
<a name="l00032"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a90a1928ed4cc3a9dac1e6468fcd52634">00032</a>     cv::VideoCapture <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a90a1928ed4cc3a9dac1e6468fcd52634" title="When the camera is attached to an avi file or webcam, this will be usefull to get frame...">capture_</a>;
<a name="l00033"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#aa13299a7af4a16c9403a7cc68313a523">00033</a>     std::vector&lt;std::string&gt; <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#aa13299a7af4a16c9403a7cc68313a523" title="If the motion processor use directory as input, we store here the names of files.">nameOfFiles_</a>;
<a name="l00034"></a>00034 
<a name="l00038"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a9bb3fdc8916e6d6c00a7a81408a6bbfd">00038</a>     std::string <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a9bb3fdc8916e6d6c00a7a81408a6bbfd">sourceName_</a>;
<a name="l00043"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#abbf053cdaf47914a5fe9d5c918d81358">00043</a>     std::string <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#abbf053cdaf47914a5fe9d5c918d81358">suffix_</a>;
<a name="l00048"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#ae4e50c101f03493306dce261283bdbb3">00048</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#ae4e50c101f03493306dce261283bdbb3">pos_in_loading_process_</a>;
<a name="l00049"></a>00049 
<a name="l00050"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#ab63e8294f6fdd2491b2bb06788278bfe">00050</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#ab63e8294f6fdd2491b2bb06788278bfe" title="When the camera is attached to a list of file, numFrame_ will be used to know how many frames we have...">numFrame_</a>;
<a name="l00051"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a2bb96b3fcac0b97f4ac1300b45a62338">00051</a>     <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a2bb96b3fcac0b97f4ac1300b45a62338" title="if below 0, represent the wanted width of Mat returned by getFrame( );">wantedWidth_</a>;
<a name="l00052"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a830a9edd5325e704b3bce8ed3ecffdba">00052</a>     <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a830a9edd5325e704b3bce8ed3ecffdba" title="if below 0, represent the wanted height of Mat returned by getFrame( );">wantedHeight_</a>;
<a name="l00053"></a>00053 
<a name="l00058"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#ab2e834efe3af08e185002f5903e4312d">00058</a>     uchar <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#ab2e834efe3af08e185002f5903e4312d">convertToRGB_</a>;
<a name="l00059"></a>00059   <span class="keyword">public</span>:
<a name="l00060"></a>00060     <a class="code" href="class_opencv_sf_m_1_1_motion_processor.html" title="This class try to create a commun interface for files loading. Indeed, if you want to use webcam...">MotionProcessor</a>( <span class="keywordtype">void</span> );
<a name="l00061"></a>00061     ~<a class="code" href="class_opencv_sf_m_1_1_motion_processor.html" title="This class try to create a commun interface for files loading. Indeed, if you want to use webcam...">MotionProcessor</a>( <span class="keywordtype">void</span> );
<a name="l00062"></a>00062 
<a name="l00069"></a><a class="code" href="class_opencv_sf_m_1_1_motion_processor.html#a30629fa0a0f3f9a941a97a27c618e22a">00069</a>     <span class="keyword">inline</span> <span class="keywordtype">bool</span> isBidirectional( )
<a name="l00070"></a>00070     {
<a name="l00071"></a>00071       <span class="keywordflow">return</span> type_of_input_ != IS_WEBCAM;
<a name="l00072"></a>00072     }
<a name="l00079"></a>00079     <span class="keywordtype">bool</span> setInputSource( <span class="keywordtype">int</span> idWebCam );
<a name="l00086"></a>00086     <span class="keywordtype">bool</span> setInputSource( std::vector&lt;std::string&gt; list_images );
<a name="l00094"></a>00094     <span class="keywordtype">bool</span> setInputSource( std::string nameOfFile,TypeOfMotionProcessor inputType=IS_SINGLE_FILE );
<a name="l00104"></a>00104     <span class="keywordtype">bool</span> setInputSource( std::string prefix,std::string suffix,<span class="keywordtype">int</span> startNumber=0 );
<a name="l00109"></a>00109     cv::Mat getFrame( );
<a name="l00116"></a>00116     <span class="keywordtype">bool</span> setProperty( <span class="keywordtype">int</span> idProp,<span class="keywordtype">double</span> value );
<a name="l00123"></a>00123     <span class="keywordtype">double</span> getProperty( <span class="keywordtype">int</span> idProp );
<a name="l00124"></a>00124   };
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 21 2011 16:45:52 for GSoC2011SfM by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
